﻿Public Class GeoLocation
    Private _workspace As Object
    Private _layerName As String
    Public oidParentText As TextBox
    'Public isVisible As Boolean = False
    Property layerName() As String
        Get
            Return _layerName
        End Get
        Set(ByVal value As String)
            _layerName = value
        End Set
    End Property

    Property workspace() As Object
        Get
            Return _workspace
        End Get
        Set(ByVal value As Object)
            _workspace = value
        End Set
    End Property

    Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
        ' isVisible = False
        If workspace IsNot Nothing Then
            workspace.cancelDrawing()
        End If
        Me.Close()
    End Sub

    Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
        If workspace IsNot Nothing Then
            workspace.activateDrawing()
        End If
    End Sub


    Private Sub btnConfirm_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnConfirm.Click
        If workspace IsNot Nothing Then
            oidValue.Text = workspace.validateDrawing()
            If oidParentText IsNot Nothing Then
                oidParentText.Text = oidValue.Text
            End If
        End If
        'isVisible = False
        Me.Close()
    End Sub

    Protected Overrides Sub OnClosing(ByVal e As System.ComponentModel.CancelEventArgs)
        MyBase.OnClosing(e)
    End Sub
End Class